package cn.lanqiao.demo.service.impl;

import cn.lanqiao.demo.dao.TeacherDao;
import cn.lanqiao.demo.entity.Teacher;
import cn.lanqiao.demo.service.TeacherService;
import cn.lanqiao.demo.vo.TeacherVaccineVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class TeacherServiceImpl implements TeacherService {



    @Resource
    private TeacherDao teacherDao;

    @Override
    public List<Map<String, Integer>> getSex() {
        return teacherDao.getSex();
    }

    //teacher全部信息方法
    @Override
    public List getAll() {
        return teacherDao.getAll();
    }

    //修改teacher全部信息方法
    @Override
    public int update(TeacherVaccineVO teacherVaccineVO) {
        return teacherDao.update(teacherVaccineVO);
    }

    //根据教师id获取信息
    @Override
    public TeacherVaccineVO getId(String Tno) {
        return teacherDao.getId(Tno);
    }

    //根据教师id删除信息
    @Override
    public int delete(String Tno) {
        return teacherDao.delete(Tno);
    }

    //增加教师方法
    @Override
    public int insert(Teacher teacher) {
        return teacherDao.insert(teacher);
    }

    //把教师编号插入到疫苗表中
    @Override
    public int insertTV(String Tno) {
        return teacherDao.insertTV(Tno);
    }
}
